package siyuan.run.feign.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import siyuan.run.feign.feignclient.MyFeignClient;

import java.net.URI;

/**
 * @program: sy
 * @description:
 * @author: Jacob
 * @create: 2020-11-24 20:06
 **/
@RestController
public class FeignController {

    @Autowired
    private MyFeignClient myFeignClient;

    @GetMapping("hello")
    public String hello(){
        String result = myFeignClient.hello();
        System.out.println("远程服务调用:"+result);
        return result;
    }
}
